<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>每日销量</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/admin.css') }}">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.3/dist/chart.umd.min.js"></script>
</head>
<body>
    <!-- 导航栏 -->
    <nav>
        <ul>
            <li><a href="{{ url_for('admin_dashboard') }}">主页</a></li>
            <li><a href="{{ url_for('admin_profile') }}">个人信息</a></li>
            <li><a href="{{ url_for('admin_logout') }}" class="logout-btn">登出</a></li>
            <li><a href="{{ url_for('admin_login') }}" class="switch-account-btn">切换账号</a></li>
            <li><a href="{{ url_for('admin_sales') }}">每日销量</a></li>
        </ul>
    </nav>

    <!-- 每日销量图表 -->
    <div class="section">
        <h2>每日销量</h2>
        <canvas id="salesChart"></canvas>
        <div id="dates-data" style="display:none;">{{ dates|tojson|safe }}</div>
        <div id="sales-data" style="display:none;">{{ sales|tojson|safe }}</div>
    </div>

    <script src="{{ url_for('static', filename='js/admin_sales.js') }}"></script>
</body>
</html>
